<?php 
$name = array(
	'name'	=> 'name',
	'id'	=> 'name',
	'size'	=> 30,
	'value' => set_value('name') != ""?set_value('name'):(isset($group))?$group->name:"",
	'class'	=> 'text-input medium-input'
);

$description = array(
	'name'	=> 'description',
	'id'	=> 'description',
	'value'	=> set_value('description') != ""?set_value('description'):(isset($group))?$group->description:"",
	'class'	=> 'text-input medium-input'
);
?>


<div class="content-box"><!-- Start Content Box -->
				
	<div class="content-box-header">
		
		<h3>Editar un nuevo Grupo</h3>
				
		<div class="clear"></div>
		
	</div> <!-- End .content-box-header -->
	
	<div class="content-box-content">
					
	<?php echo form_open($this->uri->uri_string()); ?>
	
		<fieldset> <!-- Set class to "column-left" or "column-right" on fieldsets to divide the form into columns -->

			<p>
				<label>Nombre del Grupo</label>
				<?php echo form_input($name); ?>
			</p>
			
			<p>
				<label>Descripción</label>
				<?php echo form_textarea($description); ?>
			</p>
			
			<p class="align-left">
				<input class="button" type="button" name="cancel" value="Cancelar" />
			</p>
			
			<p class="align-right">
				<input class="button" type="submit" value="Editar Grupo" />
			</p>

		</fieldset>
	
	<?php echo form_close(); ?>
	</div>
		
</div>

<script type="text/javascript">
	$(document).ready(function(){
		$("form *[name=cancel]").click(function(){
			window.location.href="<?php echo $referrer; ?>";
		})
	})
</script>